package com.junzhiit.nengji.cms.web.controller.intranet;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.cms.service.SystemUserService;
import com.junzhiit.nengji.cms.web.controller.BaseController;
import com.junzhiit.nengji.model.SystemUser;
import com.intranet.transport.object.ResultTO;

import io.swagger.annotations.ApiOperation;

@RequestMapping("/intranet/system/user")
@RestController("intranetSystemUserController")
public class SystemUserController extends BaseController {

	@Autowired
	private SystemUserService systemUserService;
	
	@ApiOperation(value = "新开城市帐号")
	@RequestMapping(value = "/addAgent", method = RequestMethod.POST)
	public ResultTO addAgent(SystemUser sysUser) throws Exception {
		return systemUserService.addAgent(sysUser);
	}
	
	@ApiOperation(value = "更新城市帐号")
	@RequestMapping(value = "/updateAgent", method = RequestMethod.PUT)
	public ResultTO updateAgent(SystemUser sysUser) throws Exception {
		return systemUserService.updateAgent(sysUser);
	}
}
